home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>5</cardCount>
- <cardID>4384</cardID>
- <listID>4637</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>448</width>
- <height>296</height>
- </cardSize>
- <script>------------------RTF Capability-----------------
-
- on TestRTF
- global RTFSTAT
- put resList() into r
- if r contains "FieldtoRTF" and r contains "RTFtoField" then
- put true into RTFSTAT
- else put false into RTFSTAT
- end TEstRTF
-
- function RTFisHere
- global RTFSTAT
- return RTFSTAT
- end RTFisHere
-
- -------------------------------------------------
-
- on openStack
- -- Requires handlers: createTheMenu,wrongStack
- if wrongStack() then pass openStack -- in case stackInUse
- if the version < 2.0 then
- put "This stack is for Hypercard 2.0. If you do not have it installed, you " into temp
- put "will not be able to run some of the functions." after temp
- answer temp
- end if
- lock screen
- testRTF
- createthemenu
- pass openStack
- end openStack
-
- on closeStack
- -- Requires handlers: deleteStackMenu,wrongStack
- if wrongStack() then pass closeStack -- in case stackInUse
- put empty into StackMenu -- clean-up for exit
- lock screen
- deleteStackMenu
- if (the visible of cd fld "About 1" of card 1) then
- send mouseUp to cd button id 5 of cd 1
- end if
- pass closeStack
- end closeStack
-
- on resumeStack
- -- Requires handlers: createTheMenu,wrongStack
- -- Requires handlers: setLocationCheckMark,changeMenuItemStatus
- if wrongStack() then pass resumeStack -- in case stackInUse
- createTheMenu
- setLocationCheckMark(short name of this card)
- pass resumeStack
- show menubar
- end resumeStack
-
- on suspendStack
- -- Requires handler: deleteStackMenu,wrongStack
- if wrongStack() then pass suspendStack -- in case stackInUse
- deleteStackMenu
- pass suspendStack
- end suspendStack
-
- function wrongStack
- return (line 1 of the stacks is not in long name of me)
- end wrongStack
-
- -------------------Menu Items-------------------------------
-
- on createTheMenu
- -- Requires function handlers: menuItemData,menuMsgData
- global StackMenu
- put "Go To" into StackMenu -- ∆
- -- remove any existing menus that might have the same name
- if there is a menu StackMenu then delete menu StackMenu
- create menu StackMenu
- put menuItemData() into menu StackMenu
- end createTheMenu
-
- function menuItemData
- -- Requires function handlers:navMenuItemData
- global backpop
- return navmenuitemdata()
- end menuItemData
-
- function navmenuitemdata
- return "Import Text,Export Text,Stack -> Stack,-,Parameters"
- end navmenuitemdata
-
- on deleteStackMenu
- global StackMenu
- if StackMenu is in the menus then delete menu StackMenu
- end deleteStackMenu
-
- on unCheckItems theItems
- global StackMenu
- if there is no menu StackMenu then exit unCheckItems
- get navMenuItemData()
- repeat with count = 1 to number of items in it
- set checkMark of menuItem item count of it of menu StackMenu to false
- end repeat
- end unCheckItems
-
- on setLocationCheckMark locationMenu
- -- Requires handler: unCheckItems
- -- set check mark for current user location
- global StackMenu
- unCheckItems "Nav"
- if locationmenu is not in NavMenuItemData() then exit setlocationcheckmark
- set the checkMark of menuItem locationMenu of menu StackMenu to true
- end setLocationCheckMark
-
- ----- Navigational Scripts --------------------
-
- on domenu temp
- global backpop
- if temp is "Import Text" then
- global filename
- lock screen
- set cursor to busy
- go to cd "import text"
- set name of cd button id 38 to "Select Stack"
- if visible of cd field "hidden" is true then
- set the visible of cd field "hidden" to false
- end if
- send "disableItems" to cd
- if checkfile(filename) then close file filename
- setlocationcheckmark(temp)
- put empty into message box
- exit domenu
- end if
-
- if temp is "Export Text" then
- lock screen
- set cursor to busy
- global cardid
- go to cd "Export Text"
- put name of this card into cardid
- send "DisableItems" to cd
- if checkfile(filename) then close file filename
- setlocationcheckmark(temp)
- if visible of cd field "hidden" is true then
- set the visible of cd field "hidden" to false
- end if
- put empty into message box
- exit domenu
- end if
-
- if temp is "Stack -> Stack" then
- lock screen
- set cursor to busy
- global cardid
- put name of this card into cardid
- go to cd "Stack -> Stack"
- send "disableitems (""e&"i""e&")" to cd
- send "disableitems (""e&"j""e&")" to cd
- send "testenable" to cd
- if visible of cd field "hidden" is true then
- set visible of cd field "hidden" to false
- end if
- if checkfile(filename) then close file filename
- setlocationcheckmark(temp)
- put empty into message box
- exit domenu
- end if
-
- if temp is "Parameters" then
- global cardid
- put name of this card into cardid
- go card "parameters"
- setlocationcheckmark(temp)
- put empty into message box
- exit domenu
- end if
-
- pass domenu
- end domenu
-
- function Disableitems1 param1,param2,param3,param4
- do "set name of cd button id "¶m2&" to ""e&"Open Stack""e
- do "put empty into cd fld id "¶m3
- do "put empty into cd fld id "¶m4
- do "set the textfont of cd fld ""e¬
- ¶m1&"background to use""e&" to chicago gray"
- return true
- end DisableItems1
-
- on dolock param
- set lockscreen to param
- set lockmessages to param
- set lockrecent to param
- end dolock
-
- function volumenamed filename
- get offset (":",filename)
- put char 1 to it of filename into volname
- return volname
- end volumenamed
-
- function Checkfile filename
- global errGlobal
- if filename is empty then
- return false
- exit checkfile
- else
- put volumenamed(filename) into newVolume
- if newVolume = empty then
- return false
- exit checkfile
- else
- put OpenFiles(newVolume, "noDialog:errGlobal") into fileList
- if errGlobal ≠ empty then
- answer "Error:" && errGlobal
- put empty into errGlobal
- return false
- exit checkfile
- end if
- repeat with rr = 1 to number of lines of filelist
- if line rr of filelist is filename then
- return true
- exit checkfile
- end if
- end repeat
- end if
- return false
- end if
- end checkfile
-
-
- function leafname filein
- put (length(filein)) into temp
- repeat with rr = temp down to 1
- if char rr of filein is ":" then exit repeat
- end repeat
- return char (rr+1) to temp of filein
- end leafname
-
- </script>
- <background id="2959" file="background_2959.xml" name="Front Background" />
- <background id="17972" file="background_17972.xml" name="Export-Import" />
- <card id="4384" file="card_4384.xml" marked="false" name="First" owner="2959" />
- <card id="18384" file="card_18384.xml" marked="false" name="Import Text" owner="17972" />
- <card id="8359" file="card_8359.xml" marked="false" name="Export TExt" owner="17972" />
- <card id="2103" file="card_2103.xml" marked="false" name="Stack -> Stack" owner="17972" />
- <card id="7075" file="card_7075.xml" marked="false" name="Parameters" owner="17972" />
- </stack>
-